#pragma once
#include "GeoExport.h"

#include "BoundingBox.h"
#include "Types.h"
#include <list>

class Vertex;
class Face;
class Edge;

class GEO_API Mesh {
public:
    Mesh();
    ~Mesh();

    ID id() const { return _id; }

    void addVertex(Vertex* v);
    void addFace(Face* f);
    void addEdge(Edge* e);

    const std::list<Vertex*>& vertices() const { return _vertices; }
    const std::list<Face*>& faces() const { return _faces; }
    const std::list<Edge*>& edges() const { return _edges; }

    Size vertexCount() const { return _vertices.size(); }
    Size faceCount() const { return _faces.size(); }
    Size edgeCount() const { return _edges.size(); }

    Face* face(ID faceId);

private:
    ID _id;

    std::list<Vertex*> _vertices;
    std::list<Face*> _faces;
    std::list<Edge*> _edges;

    BoundingBox _bbox;
};